<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style>
		*{
			margin: 0px;
			padding: 0px;
		}
		li{
			list-style: none;
		}
		.box{
			width: 400px;
			height: 230px;
			margin: 100px auto;
		}
		.tab_top{
			width: 400px;
			height: 30px;
			background: red url() 0 0 no-repeat;
		}
		.top_item{
			float: left;
			width: 20%;
			height: 30px;
			background: #F5F5F5 url() 0 0 no-repeat;
			text-align: center;
			line-height: 30px;
			cursor: pointer;
		}
		.tab_top .active{
			background: #80B600 url() 0 0 no-repeat;
			color: #fff;
		}
		.tab_bottom{
			width: 400px;
			height: 200px;
			background: blue url() 0 0 no-repeat;
			position: relative;
		}
		.bottom_item{
			width: 400px;
			height: 200px;
			background: #80B600 url() 0 0 no-repeat;
			position: absolute;
			top: 0px;
			left: 0px;
			line-height: 200px;
			text-align: center;
			font-size: 40px;
			color: #fff;
			display: none;
		}
		.tab_bottom .active{
			display: block;
		}
	</style>
	<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
	<script>
		
		$(function(){

			$('.top_item').click(function(event) {

				$(this).addClass('active').siblings().removeClass('active');

				num = $(this).index();

				$('.bottom_item').eq(num).show().siblings().hide();
			});
		})
	</script>
</head>
<body>
	<div class="box">
		<ul class="tab_top">
			<li class="top_item active">tab1</li>
			<li class="top_item">tab2</li>
			<li class="top_item">tab3</li>
			<li class="top_item">tab4</li>
			<li class="top_item">tab5</li>
		</ul>
		<ul class="tab_bottom">
			<li class="bottom_item active">content1</li>
			<li class="bottom_item">content2</li>
			<li class="bottom_item">content3</li>
			<li class="bottom_item">content4</li>
			<li class="bottom_item">content5</li>
		</ul>
	</div>
</body>
</html>